package org.Lin.server;

import java.io.*;
import java.nio.file.*;
import java.text.SimpleDateFormat;
import java.util.Date;

public class MessageStore {

    public static void store(String data) {
        try {
            String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
            Files.write(Paths.get("logs/" + timestamp + ".json"), data.getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
